import logging

from rest_framework.response import Response
from rest_framework.views import APIView

logger = logging.getLogger("django")

# Create your views here.
class TestAPIView(APIView):
    def get(self,request):
        # from django.db import DatabaseError
        # raise DatabaseError("连接数据库失败!")
        logger.info("有人访问了测试接口!")
        return Response({"message":"Hello,users!!!"},)
